package com.example.mapper;

import com.example.pojo.entity.WriteOff;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface WriteOffMapper {

    @Insert("insert into `write-off` (order_num,state) values(#{orderNum},#{state})")
    void insert(WriteOff writeOff);

    @Insert("update `write-off` set state=#{state} where order_num=#{orderNum}")
    void updateWriteOff(WriteOff writeOff);

    @Select("select * from `write-off` where order_num=#{orderNum}")
    WriteOff selectByOrderNum(String orderNum);
}
